package com.party.core.model.photo;

import java.util.Date;

/**
 * @Description: 相册照片和图片资源库的信息
 * @Author: yangshoukun
 * @Date: 2018/5/29 17:55
 */
public class PhotosImgInfoWithResource extends PhotosImgInfo {

    private static final long serialVersionUID = -589734870292049949L;

    private long size; // 文件大小
    private String name; // 文件名不带扩展名
    private String suffix; // 扩展名
    private String path; // 文件路径
    private String type; // 业务类型
    private String width; // 图片宽度
    private String ratio; // 图片宽高比
    private String cameraType; // 拍摄型号
    private Date shootTime; // 拍摄时间

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getWidth() {
        return width;
    }

    public void setWidth(String width) {
        this.width = width;
    }

    public String getRatio() {
        return ratio;
    }

    public void setRatio(String ratio) {
        this.ratio = ratio;
    }

    public String getCameraType() {
        return cameraType;
    }

    public void setCameraType(String cameraType) {
        this.cameraType = cameraType;
    }

    public Date getShootTime() {
        return shootTime;
    }

    public void setShootTime(Date shootTime) {
        this.shootTime = shootTime;
    }

    @Override
    public String toString() {
        return "PhotosImgInfoWithResource{" +
                "size=" + size +
                ", name='" + name + '\'' +
                ", suffix='" + suffix + '\'' +
                ", path='" + path + '\'' +
                ", type='" + type + '\'' +
                ", width='" + width + '\'' +
                ", ratio='" + ratio + '\'' +
                ", cameraType='" + cameraType + '\'' +
                ", shootTime=" + shootTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof PhotosImgInfoWithResource)) return false;
        if (!super.equals(o)) return false;

        PhotosImgInfoWithResource that = (PhotosImgInfoWithResource) o;

        if (size != that.size) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (suffix != null ? !suffix.equals(that.suffix) : that.suffix != null) return false;
        if (path != null ? !path.equals(that.path) : that.path != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (width != null ? !width.equals(that.width) : that.width != null) return false;
        if (ratio != null ? !ratio.equals(that.ratio) : that.ratio != null) return false;
        if (cameraType != null ? !cameraType.equals(that.cameraType) : that.cameraType != null) return false;
        return shootTime != null ? shootTime.equals(that.shootTime) : that.shootTime == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (int) (size ^ (size >>> 32));
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (suffix != null ? suffix.hashCode() : 0);
        result = 31 * result + (path != null ? path.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (width != null ? width.hashCode() : 0);
        result = 31 * result + (ratio != null ? ratio.hashCode() : 0);
        result = 31 * result + (cameraType != null ? cameraType.hashCode() : 0);
        result = 31 * result + (shootTime != null ? shootTime.hashCode() : 0);
        return result;
    }
}
